package com.gem.springbootdemo.service.Impl;

import com.gem.springbootdemo.entity.Goods;
import com.gem.springbootdemo.mapper.GoodsMapper;
import com.gem.springbootdemo.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class goodsServcieImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<Goods> getAllGoods() {
        return goodsMapper.selectAllGoods();
    }

    @Override
    public Goods getGoodsById(int gid) {
        return goodsMapper.selectById(gid);
    }
}
